             package com.java.diagnostics.visualizer.gc.realtimeV2.parser;
             
             import com.java.diagnostics.visualizer.data.StructuredDataBuilder;
             import com.java.diagnostics.visualizer.factory.DataFactory;
             import com.java.diagnostics.visualizer.gc.realtime.util.Messages;
             import org.xml.sax.Attributes;
             
             public class AttributeParser
               extends Parser
             {
               public static final String ATTRIBUTE = "attribute";
               private static final String NAME = "name";
               private static final String VALUE = "value";
               StructuredDataBuilder attributes;
               
               AttributeParser(CommonData commonData, DataFactory factory)
               {
                 super(commonData);
                 this.attributes = factory.createStructuredData("RealtimeLabels.attributes", Messages.getString("RealtimeLabels.attributes"));
               }
               
               boolean startElement(String uri, String localName, String name, Attributes atts, String comment)
               {
                 if (name.equals("attribute")) {
                   String attName = atts.getValue("name");
                   String attValue = atts.getValue("value");
                   if ((attName != null) && (attValue != null)) {
                     this.attributes.put(attName, attValue);
                   }
                   return true;
                 }
                 return super.startElement(uri, localName, name, atts, comment);
               }
               
               boolean endElement(String uri, String localName, String name, String comment)
               {
                 return (!name.equals("initialized")) && (super.endElement(uri, localName, name, comment));
               }
             }


